package com.lqd.mall.interaction.system;

import com.lqd.mall.interaction.annotation.Excel;
import com.lqd.mall.interaction.basis.BasisEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Setter
@Getter
@Table(name = "sys_post")
public class SysPostEntity extends BasisEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 岗位序号
     */
    @Id
    @Column(name = "post_id")
    @Excel(name = "岗位序号", cellType = Excel.ColumnType.NUMERIC)
    private Long postId;

    /**
     * 岗位编码
     */
    @Column(name = "post_code")
    @Excel(name = "岗位编码")
    private String postCode;

    /**
     * 岗位名称
     */
    @Column(name = "post_name")
    @Excel(name = "岗位名称")
    private String postName;

    /**
     * 岗位排序
     */
    @Column(name = "post_sort")
    @Excel(name = "岗位排序")
    private String postSort;

    /**
     * 状态（0正常 1停用）
     */
    @Column(name = "status")
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /**
     * 用户是否存在此岗位标识 默认不存在
     */
    @Transient
    private boolean flag = false;
}